<!DOCTYPE html>
<html>
	<head>
        <meta charset="UTF-8">
	        {% if title %}
	            <title>{{ title }} - blog</title>
	        {% else %}
	            <title>blog</title>
	        {% endif %}
	    <link href="/static/css/bootstrap.min.css" rel="stylesheet" media="screen">
	    <link href="/static/css/bootstrap-responsive.min.css" rel="stylesheet">
	    <script src="http://code.jquery.com/jquery-latest.js"></script>
	    <script src="/static/js/bootstrap.min.js"></script>
	</head>
	<body>
		<div class="container">
			<div class="navbar">
				<div class="navbar-inner">
					<a class="brand" href="/">我的博客</a>
					<ul class="nav">
						<li><a href="{{ url_for('index') }}">主页面</a></li>
						{% if g.user.is_authenticated %}
                            <li><a href="{{ url_for('user',username = g.user.username)}}">你的资料</a></li>
						    <li><a href="{{ url_for('logout') }}">注销账号</a></li>
						{% endif %}
						    <li><a href="{{ url_for('login') }}">登录</a></li>
						    <li><a href="{{ url_for('sign_up') }}">注册</a></li>
					</ul>
				</div>
			</div>
			<div class="row">
            <div class="span3">
                <div class="well sidebar-nav">
					<h1 class="brand-title">爷的博客</h1>
					<h3 class="brand-tagline">评价丁太升</h3>
                    <ul class="nav nav-list">
                    <li class="nav-header">选择</li>
                        <a class="btn btn-default" href="/" >主页面</a>
                        <a class="btn btn-default" href="#" >Archive</a>
                        {% if g.user.username %}
                            <a class="btn btn-default" href="{{ url_for('user',username=g.user.username)}}">关于我</a>
                        {% else %}
                            <a class="btn btn-default" href="{{ url_for('login')}}">关于我</a>
                        {% endif %}
                        <a class="btn btn-default" href="{{ url_for('write')}}">写东西</a>
                    </ul>
                </div><!--/.well -->
            </div><!--/span-->
			<div class="span9">
					{% block content %}{% endblock %}
			</div>
		</div>
		</div>
	</body>
</html>
